import React from 'react'
import MainLayout from '../views/mainLayout'
import Home from '../views/home'
import ListManage from '../views/listManage'
import ListAdd from '../views/listAdd'
import Set from '../views/set'
import Upload from '../views/upload'
export const mainLayoutChildren = [
  {
    path: '/',
    element: <Home></Home>,
    meta: {
      label: '首页',
    },
  },
  {
    path: '/list',
    meta: {
      label: '列表管理',
    },
    children: [
      {
        path: '/list/add',
        element: <ListAdd></ListAdd>,
        meta: {
          label: '列表添加',
        },
      },
      {
        path: '/list/manage',
        element: <ListManage></ListManage>,
        meta: {
          label: '列表操作',
        },
      },
    ],
  },
  {
    path: '/upload',
    element: <Upload></Upload>,
    meta: {
      label: '上传文件',
    },
  },
  {
    path: '/person',
    meta: {
      label: '人员管理',
    },
    children: [
      {
        path: '/person/add',
        meta: {
          label: '人员添加',
        },
        element: <div>人员添加页面</div>,
      },
      {
        path: '/person/query',
        meta: {
          label: '人员查询',
        },
        element: <div>人员查询页面</div>,
      },
    ],
  },
  {
    path: '/set',
    element: <Set></Set>,
    meta: {
      label: '设置',
    },
  },
]
export const routes = [
  {
    path: '/',
    element: <MainLayout></MainLayout>,
    children: mainLayoutChildren,
  },
]
